package com.ts.api.manage.cms;

import com.ts.framework.domain.cms.CmsPage;
import com.ts.framework.domain.cms.request.QueryPageRequest;
import com.ts.framework.domain.cms.response.CmsPageResult;
import com.ts.framework.model.response.QueryResponseResult;
import com.ts.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(tags = "CMS页面管理接口", description = "负责页面增删改查")
public interface CmsPageControllerApi {

    @ApiOperation("根据条件分页查询页面信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码", name = "page", paramType = "path", dataType = "Integer", required = true),
            @ApiImplicitParam(value = "每页显示条数", name = "size", paramType = "path", dataType = "Integer", required = true),
            @ApiImplicitParam(value = "CmsPage请求参数对象", name = "queryPageRequest", paramType = "query", dataType = "QueryPageRequest", required = false)
    })
    public QueryResponseResult findCmsPageByPage(Integer page, Integer size, QueryPageRequest queryPageRequest);


    @ApiOperation("新增页面信息")
    @ApiImplicitParam(value = "CmsPage信息", name = "cmsPage", dataType = "CmsPage", paramType = "body")
    public CmsPageResult addCmsPage(CmsPage cmsPage);

    @ApiOperation("查询站点信息")
    public QueryResponseResult querySiteId();

    @ApiOperation("查询模板信息")
    public QueryResponseResult queryTemplate();

    @ApiOperation("根据ID查询页面")
    @ApiImplicitParam(value = "页面预览", name = "id", dataType = "String", paramType = "path")
    public CmsPageResult findCmsPageById(String id);

    @ApiOperation("更新页面信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "CmsPage信息", name = "id", paramType = "path", dataType = "String"),
            @ApiImplicitParam(value = "CmsPage信息", name = "cmsPage", paramType = "body", dataType = "CmsPage"),
    })
    public CmsPageResult updateCmsPage(String id, CmsPage cmsPage);

    @ApiOperation("删除页面信息")
    @ApiImplicitParam(value = "CmsPageId", name = "id", dataType = "String", paramType = "path")
    public ResponseResult deleteCmsPageById(String id);



}
